package cn.cloud.butler.webapi.service;

import cn.cloud.butler.webapi.domain.AppExceptionLogEntity;
import cn.cloud.butler.webapi.repository.AppExceptionLogRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * All rights Reserved,Designed By TangYue
 *
 * @author: 汤越
 * @date: 2019/8/1 16:34
 * @copyright: @2019
 */
@Service
public class AppExceptionLogService {

    @Autowired
    AppExceptionLogRepository appExceptionLogRepository;

    public Integer Add(String createTime,String fingerPrint,String phoneNumber,String versionInfo,String value) {
        AppExceptionLogEntity appExceptionLogEntity = new AppExceptionLogEntity();
        appExceptionLogEntity.setCreateTime(createTime);
        appExceptionLogEntity.setFingerPrint(fingerPrint);
        appExceptionLogEntity.setPhoneNumber(phoneNumber);
        appExceptionLogEntity.setValue(value);
        appExceptionLogEntity.setVersionInfo(versionInfo);
        return appExceptionLogRepository.saveAndFlush(appExceptionLogEntity).getId();

    }

}
